<template>
  <div class="control-panel">
    <div class="panel-grid">
      <div
        v-for="(btn, index) in buttons"
        :key="index"
        class="panel-button-wrapper"
      >
        <status-indicator
          :label="btn.label"
          :statusValue="btn.active"
          :activeClassPrefix="btn.activeClassPrefix || 'active-circle-primary'"
          :isWrap="false"
          :textRight="false"
        />
      </div>
    </div>
  </div>
</template>

<script>
import StatusIndicator from "../StatusIndicator.vue";

export default {
  components: { StatusIndicator },
  props: {
    statusInfo: {
      type: Object,
      default: () => ({}),
    },
    buttons: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {};
  },
  watch: {},
  methods: {},
};
</script>

<style lang="less" scoped>
.control-panel {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.panel-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2列 */
  grid-template-rows: repeat(4, 1fr); /* 4行 */
  column-gap: 5%;
  row-gap: 5%;
}

.panel-button-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  //   background: pink;
}

/* 状态指示器样式增强 */
.status-indicator {
  width: 100%;
  height: 100%;

  .label {
    font-size: 14px;
    font-weight: bold;
    color: #222;
  }

  .circle {
    width: 12px;
    height: 12px;
  }
}

/* 新增橙色状态样式 */
.circle.active-circle-orange {
  background: #ff9800;
  border-color: #ff9800;
}
</style>